//Game Class
#include "Game.h"

//default constructor
Game::Game() {
    Surf_Display = NULL;
    Running = true;

}

//OnExecute-
int Game::OnExecute() {
    if(OnInit() == false) {
        return -1;
    }

    SDL_Event Event;

    while(Running) {
        while(SDL_PollEvent(&Event)) {
            OnEvent(&Event);
        }

        OnLoop();
        OnRender();
    }

    OnCleanup();

    return 0;
}

void Game :: setRunning(bool isRunning){
    Running = isRunning;
    }

//main
int main(int argc, char* argv[]) {
    Game theGame;

    return theGame.OnExecute();
}
